﻿using Autofac;
using MagicWorld.DDD.Domain.Repository;
using MagicWorld.DDD.Domain.Service;
using MagicWorld.DDD.Domain.Service.DamagePolicy;
using MagicWorld.DDD.Domain.Service.Impl;
using MagicWorld.DDD.Infrastructure.Repository.Impl;

namespace ConsoleApp
{
    public class MagicWorldModules : Module
    {
        protected override void Load(ContainerBuilder builder)
        {
            builder.RegisterType<CombatServiceImpl>().As<ICombatService>();
            builder.RegisterType<EquipmentServiceImpl>().As<IEquipmentService>();
            builder.RegisterType<WeaponRepository>().As<IWeaponRepository>();
            builder.Register(c => new DamageManager());
        }
    }
}